Repository navigation
Preserve list semantics when slicing spatial inertia sequences - #312
Open
kaushikgunasekaren wants to merge 2 commits into
Open
kaushikgunasekaren wants to merge 2 commits into
kaushikgunasekaren wants to merge 2 commits into
Conversation
Retain Python list slicing while keeping integer construction unchanged.
Cover empty, singleton and longer sequences, reversed and stepped slices, independent list storage, integer indexing and dynamics.
kaushikgunasekaren
requested review from
petercorke and
taughz
as code owners
November 18, 2026 17:36
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
SpatialInertiainherits the documented list interface fromBasePoseList, but its indexing method passes a slice's list of matrices into the singleton-only constructor. Every slice raisesValueError, includinginertia[:1],inertia[::-1]and empty slices.Change
For a slice, create an empty
SpatialInertiaand store the sliced matrix list. This keeps Python list slice ordering, steps and bounds, and avoids routing a list through the singleton constructor. Integer indexing is unchanged. Like a Python list slice, the new container has independent list storage, not deep-copied matrices.Validation
tests/test_dualquaternion.py.AI assistance was used for investigation, implementation and tests. Validation is local Python testing only; no hardware validation is claimed.